import request from '@/router/axios';



export const getList = (current, size,params) => {
  return request({
    url: '/api/hg-logistics/warning/rule/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

export const add = (row) => {
  return request({
    url: '/api/hg-logistics/warning/rule/add',
    method: 'post',
    data: row
  })
}

export const update = (row) => {
  return request({
    url: '/api/hg-logistics/warning/rule/update',
    method: 'post',
    data: row
  })
}

export const remove = (ids) => {
  return request({
    url: '/api/hg-logistics/warning/rule/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}


export const startPause = (id,status) => {
  return request({
    url: '/api/hg-logistics/warning/rule/enable-disable',
    method: 'get',
    params: {
      id,
      status,
    }
  })
}


export const getStorageAreaList = (current,size,data) => {
  return request({
    url: '/api/hg-logistics/inventory/area/list',
    method: 'get',
    params: {
      ...data,
      current,
      size,
    }
  })
}

export const getMaterialList = (current,size,data) => {
  return request({
    url: '/api/hg-public/material/info/page',
    method: 'get',
    params: {
      ...data,
      current,
      size,
    }
  })
}

export const getMaterial = (materialId)=> {
  return request({
    url: '/api/hg-public/material/info/info2',
    method: 'get',
    params:{
      "id":materialId
    }
  })
}

export const getAreaInfo = (id) => {
  return request({
    url: '/api/hg-logistics/inventory/area/info',
    method: 'get',
    params:{
      id,
    }
  })
}
